using System.Windows;
using WPFServices.Models.Domain;
using WPFServices.ViewModels.DomainViewModel.ProcessRouteinfo;

namespace WPFServices.Views.DomainViews.ProcessRouteinfo
{
    /// <summary>
    /// ProcessRouteSelectionWindow.xaml 的交互逻辑
    /// </summary>
    public partial class ProcessRouteSelectionWindow : Window
    {
        private readonly ProcessRouteSelectionViewModel _viewModel;

        public ProcessRouteDto SelectedProcessRoute => _viewModel.SelectedProcessRoute;

        public ProcessRouteSelectionWindow()
        {
            InitializeComponent();
            _viewModel = new ProcessRouteSelectionViewModel();
            DataContext = _viewModel;

            // 订阅关闭窗口事件
            _viewModel.CloseWindow += (result) =>
            {
                DialogResult = result;
                Close();
            };
        }
    }
} 